function EnterTalk(parent, talk, postFunc)
    if parent and talk and #talk>=1 and (#talk==1 or #talk==2 and talk[1]<=talk[2]) then
        local shade = AddShade(parent);
        
        local tid = talk[1];
        local talkData = EXCEL.talk[tid];
        local currentLen = 0;
        local totalLen = 0;
        local scene = nil;
        local showNext = nil;
        local begin = os.clock();
        
        local function ShowNextAndPostFunc(showAll)
            if not showNext(showAll) then
                parent:removeChild(shade);
                parent:removeChild(scene);
                if postFunc then    
                    postFunc();
                end
            end
        end
        
        local function _onUpdate()
            local t = os.clock();
            if (totalLen>0 and currentLen==totalLen) then
                if t*1000>begin*1000+EXCEL.const["talkSleepTime"] then
                    begin = t;
                    ShowNextAndPostFunc();
                end
            elseif t>begin+0.1 then
                begin = t;
                ShowNextAndPostFunc();
            end
        end
        scene = LoadJson("talk.json",_onUpdate);
        scene:setPosition(cc.p(0, 0));
        parent:addChild(scene);
        local who = scene.layer:getChildByName("who");
        local content = scene.layer:getChildByName("content");
        local left = scene.layer:getChildByName("left");
        local right = scene.layer:getChildByName("right");
        
        local color = EXCEL.const["talkColor"];
        who:setColor(cc.c3b(color[1], color[2], color[3]))
        who:setFontSize(EXCEL.const["talkSize"])

        local color = EXCEL.const["talkColor"];
        content:setColor(cc.c3b(color[1], color[2], color[3]))
        content:setFontSize(EXCEL.const["talkSize"])

        content:setString("");
        content:ignoreContentAdaptWithSize(false)
        content:setContentSize(cc.size(400,500))
        showNext = function(showAll)
            if currentLen >= string.len(GetUtf8(talkData.content)) then
                tid = tid + 1;
                if not talk[2] or tid>talk[2] then
                    return false;
                end
                talkData = EXCEL.talk[tid];
                currentLen = 0;            
            end
            
            if not talkData then
                return false;
            end
            
            totalLen = string.len(GetUtf8(talkData.content));
            local preLen = currentLen;
            currentLen = currentLen + 3;
            currentLen = math.floor(currentLen)
            if (showAll and preLen>0) or currentLen > totalLen then
                currentLen = totalLen;
            end
            who:setString(GetUtf8(talkData.name))
            content:setString(string.sub(GetUtf8(talkData.content), 0, currentLen))
            
            if talkData.side=="left" then
                left:loadTexture(talkData.path)
                left:setVisible(true);
                right:setVisible(false);
            else
                right:loadTexture(talkData.path)
                right:setVisible(true);
                left:setVisible(false);
            end
            return true;
        end
        showNext();
        local function onTouchBegan(touch, event)
            return true
        end
        local function onTouchEnded(touch, event)
            ShowNextAndPostFunc(true);
            if true then return true end;
        end
        --事件响应
        local listener = cc.EventListenerTouchOneByOne:create()
        listener:registerScriptHandler(onTouchBegan,cc.Handler.EVENT_TOUCH_BEGAN)
        listener:registerScriptHandler(onTouchEnded,cc.Handler.EVENT_TOUCH_ENDED)
        scene:getEventDispatcher():addEventListenerWithSceneGraphPriority(listener, scene)
    else
        if postFunc then
            postFunc();
        end
    end
end

